<!DOCTYPE html>
<html lang="en">
<head>
    {% load static %}
    <meta charset="UTF-8">
    <link href="{% static 'favicon1.ico' %}" rel="shortcut icon" type="image/x-icon">
    <script src="{% static 'store/js/jquery-3.1.1.min.js' %}"></script>
    {% include 'back_to_top_func.html' %}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
            integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
            crossorigin="anonymous"></script>
    <link rel="stylesheet" href="{% static 'store/js/bootstrap.min.js' %}">
    <link rel="stylesheet" href="{% static 'store/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'font-awesome-4.7.0/css/font-awesome.css' %}">
    <meta charset="utf-8">
    <link rel="stylesheet" href="{% static 'store/css/style.css' %}">
    <title>FP Shopping</title>
    <style>
        #index_font{
            font-family: 华文行楷, fangsong;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-sm-6"><a href="{% url 'store:index' %}"><img src="{% static 'store/Kloth.png' %}" alt="图标"></a>
        </div>
        <div class="col-sm-6 text-center text-uppercase" id="slogan">
            <br>
            <br>
            <br>
            <h1>FP Shopping</h1>
            <h3 id="index_font">一站式购物</h3>
        </div>
    </div>
    <hr class="hstyle">
    <nav class="navbar navbar-expand-sm navbar-light bg-light">
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse navbar-center" id="navbarSupportedContent">
            <ul class="navbar-nav mx-auto" id="index_font">
                <li class="nav-item active">
                    <a class="nav-link" href="{% url 'store:index' %}" style="font-size: 20px">主页</a>
                </li>
                <li class="nav-item active">
                    <a class="nav-link" href="{% url 'store:categories' %}" style="font-size: 20px">种类</a>
                </li>
                {% if user.is_authenticated %}
                    <li class="nav-item active">
                        <div class="dropdown show">
                            <a class="nav-link dropdown-toggle" href="#" role="button" id="dropdownMenuLink"
                               data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                               style="font-size: 20px">
                                欢迎，{{ user.username }}
                            </a>
                            <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                                <a class="dropdown-item" href="{% url 'store:shoppingcart' username=user.username %}"
                                   style="font-size: 20px; text-align: center">购物车<i class="fa fa-shopping-cart" aria-hidden="true"></i></a>
                                <a class="dropdown-item" href="{% url 'store:orders' username=user.username %}"
                                   style="font-size: 20px; text-align: center">订单<img
                                        src="{% static 'store/order.jpg' %}" alt=""></a>
                                <a class="dropdown-item" href="{% url 'store:logout' %}" style="font-size: 20px; text-align: center">
                                    登出<i class="fa fa-sign-out" aria-hidden="true"></i></a>
                            </div>
                        </div>
                    </li>
                {% else %}
                    <li class="nav-item active">
                        <a class="nav-link" href="{% url 'store:login' %}?next={{ request.path }}" style="font-size: 20px">登录</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="{% url 'store:register' %}" style="font-size: 20px">注册</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </nav>
    {% block content %}

    {% endblock %}
    <footer class="footer bg-light">
        <div class="container">
            <div class="row">
                <div class="col-sm-6">
                    <h6 class="footer-header" style="font-size: 20px;" id="index_font">关于我们</h6>
                    <p><a href="{% url 'store:aboutus' %}" class="footer-text">发现更多关于FP Shopping</a></p>
                </div>
                <div class="col-sm-6">
                    <h6 class="footer-header" style="font-size: 20px;" id="index_font">联系我们</h6>
                    <p><a href="{% url 'store:contact' %}" class="footer-text">您如何联系我们？</a></p>
                </div>
            </div>
        </div>
    </footer>
</div>
<script src="{% static 'store/js/bootstrap.min.js' %}"></script>
</body>
</html>